﻿namespace FFF.Test.Application.Repositories.FW
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using Abp.Application.Services.Dto;
    using Abp.AutoMapper;
    using FFF.Test.Entity.FW;
    using FFF.Test.Entity.FW.View;

    /// <summary>
    /// 1.007 获取角色的权限(于大明)输入dto
    /// </summary>
    public class GetRoleRightsInDto
    {
        /// <summary>
        /// 角色GUID
        /// </summary>
        public Guid RoleGUID { get; set; }

        /// <summary>
        /// 当前系统的GUID
        /// </summary>
        /// <value>The application unique identifier.</value>
        /// <remarks>于大明</remarks>
        public Guid ApplicationGUID { get; set; }

        /// <summary>
        /// 是否为企业设置权限点
        /// </summary>
        /// <value>The is bu set.</value>
        /// <remarks>于大明</remarks>
        public byte IsBuSet { get; set; }
    }

    /// <summary>
    /// 1.007 获取角色的权限(于大明)输出dto
    /// </summary>
    public class GetRoleRightsOutDto
    {
        /// <summary>
        /// 模块Dtos
        /// </summary>
        public List<GetRoleRightsModuleDto> ModuleDtos { get; set; }
    }

    /// <summary>
    /// 模块Dto
    /// </summary>
    public class GetRoleRightsModuleDto
    {
        /// <summary>
        /// 模块GUID
        /// </summary>
        public Guid ModuleGUID { get; set; }

        /// <summary>
        /// 模块名称
        /// </summary>
        public string ModuleName { get; set; }

        /// <summary>
        /// 功能Dtos
        /// </summary>
        public List<GetRoleRightsFunctionDto> FunctionDtos { get; set; }
    }

    /// <summary>
    /// 功能Dto
    /// </summary>
    public class GetRoleRightsFunctionDto
    {
        /// <summary>
        /// 功能GUID
        /// </summary>
        public Guid FunctionGUID { get; set; }

        /// <summary>
        /// 功能名称
        /// </summary>
        public string FunctionName { get; set; }

        /// <summary>
        /// 父级功能名称
        /// </summary>
        /// <value>The name of the parent function.</value>
        /// <remarks>于大明</remarks>
        public string ParentFunctionName { get; set; }

        /// <summary>
        /// 父级GUID
        /// </summary>
        /// <value>The parent unique identifier.</value>
        /// <remarks>于大明</remarks>
        public Guid? ParentGUID { get; set; }

        /// <summary>
        /// 动作ftos
        /// </summary>
        public List<GetRoleRightsActionDto> ActionDtos { get; set; }
    }

    /// <summary>
    /// 动作Dto
    /// </summary>
    public class GetRoleRightsActionDto
    {
        /// <summary>
        /// 动作GUID
        /// </summary>
        public Guid ActionGUID { get; set; }

        /// <summary>
        /// 动作名称
        /// </summary>
        public string ActionName { get; set; }

        /// <summary>
        /// 是否选中
        /// </summary>
        public bool IsChecked { get; set; }
    }
}
